<template>
  <div class="pollution-source-popup">
    <div class="popup-header">
      <h3>{{  featureData.name || '排污口' }}</h3>
      <span class="close-btn" @click="closePopup">×</span>
    </div>
    <div class="popup-body">
      <div class="pollution-info">
        <!-- <div class="info-item">
          <label>排口名称:</label>
          <span>{{ featureData.outfallname || '未知' }}</span>
        </div> -->
        <div class="info-item">
          <label>行政区划:</label>
          <span>{{ featureData.county || '未知' }}</span>
        </div>
        <div class="info-item">
          <label>河流名称:</label>
          <span>{{ featureData.lakename || '未知' }}</span>
        </div>
        <div class="info-item">
          <label>状态:</label>
          <span>{{ featureData.state && this.stateMap ? (this.stateMap[featureData.state]) : '未知' }}</span>
        </div>
        <div class="info-item">
          <label>排放方式:</label>
           <span>{{ featureData.outtype && this.outtypeMap ? (this.outtypeMap[featureData.outtype]) : '未知' }}</span>
       
        </div>
        

      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Rehepaiwukou',
  data: function () {
    return {
      stateMap: {
        '1': '启用',
        '0': '停用'
      },
        outtypeMap: {
        '01': '连续排放',
        '02': '停间歇排放用',
             '03': '其他',
      },
     
     
    };
  },
  props: {
    featureData: {
      type: Object,
      default: () => ({})
    }
  },

  methods: {
    closePopup() {
      this.$emit('close');
    }
  }
};
</script>

<style scoped>
.pollution-source-popup {
  min-width: 300px;
  max-width: 450px;
}

.popup-header {
  padding: 12px 16px;
  border-bottom: 1px solid #ebeef5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 16px;
  color: #303133;
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
  color: #909399;
}

.close-btn:hover {
  color: #409eff;
}

.popup-body {
  padding: 16px;
}

.info-item {
  display: flex;
  margin-bottom: 10px;
  font-size: 14px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item label {
  width: 120px;
  color: #606266;
  font-weight: 500;
}

.info-item span {
  flex: 1;
  color: #303133;
}

.pollution-level {
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  font-size: 12px;
}
</style>